<?php

/*
	[NianCode] (C)2010-2011 NianCode Inc.
	--------------------------------------------
	------------NianCode v1.01beta--------------
	------------powered by nianks~--------------
	--------------------------------------------
	$Id: nc_class.inc.php 2010-4-17 19:29:26 NC nianks $
*/

if(!defined('IN_NC')) {
	exit('Access Denied');
}

class Timer {

	var $StartTime = 0;
	var $StopTime = 0;

	function get_microtime() {
		list($usec, $sec) = explode(' ', microtime());
		return ($usec + $sec);
	}

	function start() {
		$this->StartTime = $this->get_microtime();
	}

	function stop() {
		$this->StopTime = $this->get_microtime();
	}

	function spent() {
		return number_format($this->StopTime - $this->StartTime, 6);
	}
} 


class Niancode {
	
	var $version = NC_VERSION;
	function load($ldname, $ldtype = NC_LIB) {
		if(empty($ldname)) {
			echo 'load error';Exit;
		}
		include NC_SHOW.$ldname.I_EXT;
	}
	function view() {
		
	}
	
}
?>